<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * conlabzCMS
 *
 * A website backend system for developers for PHP 4.3.2 or newer
 *
 * @package         conlabz CMS
 * @author          Christian Schneider
 * @copyright       Copyright (c) 2009
 * @license        
 * @link            http://www.conlabz.de
 * @filesource
 */

// ---------------------------------------------------------------------------

/**
 * Weather
 *
 * Get weather from Google Api
 *
 * @package         conlabz CMS
 * @subpackage      Controllers
 */
class Weather extends Public_Controller {
	function Weather( ) {
		parent::Public_Controller( );

		// Load the validation library
		$this->load->library( 'simplexml' );
		
		// Load the weather model
		$this->load->model( 'weather_model' );
		
		// Load the weather module
		$this->lang->module_load( 'weather', 'weather' );
		
		log_message( 'debug', 'conlabz CMS : Weather class loaded' );
	}

	/**
	 * View weather
	 *
	 * @access public
	 */

	function index()
	{
		$domain = "www.trassenheide.de";
		// Get Weather Infomation
		$data['weather'] = $this->weather_model->getXML( $domain );

		// Display Page
		$data['header'] = $this->lang->line( 'weather_overview' );
		$data['page'] = "view_weather";
		$data['module'] = 'weather';
		$this->load->module_view( $data['module'], $data['page'], $data );
	}
} 